<template>
  <div class="home">
    <div class="home_top">
      <!-- 渲染我的子路由 -->
      <RouterView />
    </div>
    <div class="home_bottom">
      <RouterLink to="/films">电影</RouterLink>
      <RouterLink to="/cinemas">影院</RouterLink>
      <RouterLink to="/posts">资讯</RouterLink>
      <RouterLink to="/center">我的</RouterLink>
    </div>
  </div>
</template>

<style>
* {
  margin: 0;
  padding: 0;
}

html,
body,
#app {
  height: 100%;
}

.home {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.home_bottom {
  display: flex;
  height: 50px;
  border-top: 1px solid #000;
}

.home_bottom a {
  flex: 1;
  height: 50px;
  line-height: 50px;
  text-align: center;
}

.home_bottom a.router-link-active {
  color: red;
}

.home_top {
  flex: 1;
  background-color: #ccc;
}
</style>
